#!/usr/bin/env python3
# coding:utf-8
import sched
import time

s = sched.scheduler(time.time, time.sleep)
a = 0
b = 0

def fun_a():
    global a
    print(f"a={a} {time.time()}")
    a += 1
    s.enter(5,1,fun_a,())

def fun_b():
    global b
    print(f"b={b} {time.time()}")
    b += 1
    s.enter(10,1,fun_b,())

s.enter(5,1,fun_a,())
s.enter(10,1,fun_b,())
s.run()
